<html>
<head>
<title>Calculadora</title>
<script type="text/javascript" language="javascript" src="../funciones/calculos.js"></script>	
<script>

	var cursor;
	if (document.all) {
	// Está utilizando EXPLORER
	cursor='hand';
	} else {
	// Está utilizando MOZILLA/NETSCAPE
	cursor='pointer';
	}

	function inicio()
	{
		document.getElementById("campo").focus();
		document.submit();
	}

	function enviar() {
		document.getElementById("form1").submit();
	}
	
</script>
<link href="../estilos/estilos.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<? include ("../conectar.php"); ?>
<?php
$posFila=$_GET["fila"];
$posColumna=$_GET["columna"];
$tabId=$_GET["tab"];

?>
<body onload="inicio()">
<form name="form1" id="form1" method="post" onSubmit="evaluar()">
	<div id="frmBusqueda2">
		<table>
			<tr>
				<td>
					<table border=4>
						<tr>
							<td>Operacion<br>
								<input type="text" name="operacion" id="operacion" Size="16" >
							</td>
						<tr/>
						<tr>
							<td>
								<input type="text" name="campo" id="campo" Size="16" onkeyup="decimal()" onfocus="decimal()" style="text-align:right">
							</td>
						</tr>
						<tr>
							<td>
								<input type="reset" name="clear" value="  c  " OnClick="form1.campo.focus()">
								<input type="button" name="aparent" value="  (  " OnClick="boton('(')">
								<input type="button" name="cparent" value="  )  " OnClick="boton(')')">					
								<br/>
								<input type="button" name="seven" value="  7  " OnClick="numeros('7')">
								<input type="button" name="eight" value="  8  " OnCLick="numeros('8')">
								<input type="button" name="nine"  value="  9  " OnClick="numeros('9')">
								<input type="button" name="times" value="  x  " OnClick="boton('*')">
								<br/>
								<input type="button" name="four"  value="  4  " OnClick="numeros('4')">
								<input type="button" name="five"  value="  5  " OnCLick="numeros('5')">
								<input type="button" name="six"   value="  6  " OnClick="numeros('6')">
								<input type="button" name="minus" value="  -  " OnClick="boton('-')">
								<br/>
								<input type="button" name="one"   value="  1  " OnClick="numeros('1')">
								<input type="button" name="two"   value="  2  " OnCLick="numeros('2')">
								<input type="button" name="three" value="  3  " OnClick="numeros('3')">
								<input type="button" name="plus"  value="  +  " OnClick="boton('+')">
								<br/>
								<input type="button" name="zero"  value="  0  " OnClick="numeros('0')">
								<input type="button" name="DoIt"  value="  =  " OnClick="evaluar('<?echo $tabId?>',<?echo $posFila?>,<?echo $posColumna?>)">
								<input type="button" name="div"   value="  /  " OnClick="boton('/')">
							</td>
						</tr>
					</table>
				</td>
				<td align="top"><input type="checkbox" name="decimalcheck" id="decimalcheck" onclick="decimal()"/> 2 decimales</td>
			</tr>
		</table>
		<table width="100%" border="0">
			<tr>
				<td align="center"><img src="../img/botoncerrar.jpg" width="70" height="22" onClick="window.close()" border="1" onMouseOver="style.cursor=cursor"><td/>				
			</tr>
		</table>		
		
		<input id="posFila" name="posFila" value="<?php echo $posFila?>" type="hidden">
		<input id="posColumna" name="posColumna" value="<?php echo $posColumna?>" type="hidden">
		<input id="tabId" name="tabId" value="<?php echo $tabId?>" type="hidden">

</form>
</div>
</body>
</html>
